﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="NhomSP.ascx.cs" Inherits="XLDL.Admin.NhomSP" %>
    <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
    <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
 <cc1:AlwaysVisibleControlExtender ID="AlwaysVisibleControlExtender3" runat="server"
                TargetControlID="updateProgress1" VerticalSide="Middle" HorizontalSide="Center"
                VerticalOffset="10" HorizontalOffset="10" ScrollEffectDuration=".1">
            </cc1:AlwaysVisibleControlExtender> 
                                        <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="Up_1" >
                                        <ProgressTemplate>
                                        <div style="background-color:White">
                                            <asp:Image ID="Image_loading" runat="server" ImageAlign="AbsMiddle" 
                                                ImageUrl="~/WRss/indicator.gif" />
                                        <span style="color:Blue;font-size:14px">Xin chờ trong giây lát...</span>
                                        </div>
                                        </ProgressTemplate>
                                        </asp:UpdateProgress>
<asp:UpdatePanel ID="Up_1" runat="server">
<ContentTemplate>
<table cellspacing="1" class="txt">
    <tr>
        <td align="left" valign="middle" width="80">
            Tên nhóm:</td>
        <td>
            <asp:TextBox ID="TextBox_tennhom" runat="server" Width="250px"></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td>
            Hiển thị:</td>
        <td>
&nbsp;<asp:RadioButton ID="RadioButton_co" runat="server" GroupName="ht" 
                Text="Có" />
&nbsp;<asp:RadioButton ID="RadioButton_khong" runat="server" GroupName="ht" Text="Không" 
                Checked="True" />
        </td>
    </tr>
    <tr>
        <td>
            &nbsp;</td>
        <td>
            <asp:Button ID="Button_reset" runat="server" Text="Reset" 
                onclick="Button_reset_Click" />
&nbsp;&nbsp;
            <asp:Button ID="Button_them" runat="server" onclick="Button_them_Click" 
                Text="Thêm" onclientclick="return kt_nhomsp();" />
        </td>
    </tr>
    <tr>
        <td>
            &nbsp;</td>
        <td>
            &nbsp;</td>
    </tr>
    <tr>
        <td>
            &nbsp;</td>
        <td>
            <asp:GridView ID="Luoi" runat="server" AutoGenerateColumns="False" 
                onrowcancelingedit="Luoi_RowCancelingEdit" onrowediting="Luoi_RowEditing" 
                onrowupdating="Luoi_RowUpdating" onrowdeleting="Luoi_RowDeleting">
                <Columns>
                    <asp:BoundField DataField="ngay_dang" DataFormatString="{0:dd/MM/yyyy}" 
                        HeaderText="Ngày" ReadOnly="True" />
                    <asp:TemplateField HeaderText="ID">
                        <EditItemTemplate>
                            <asp:Label ID="lbl_id" runat="server" Text='<%# Eval("id_nhom_sp") %>'></asp:Label>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="lbl_id" runat="server" Text='<%# Eval("id_nhom_sp") %>'></asp:Label>
                        </ItemTemplate>
                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="30px" />
                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Tên nhóm">
                        <EditItemTemplate>
                            <asp:TextBox ID="txt_tennhom" runat="server" Text='<%# Eval("ten_nhom_sp") %>'></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>&nbsp;
                            <asp:Label ID="lbl_tennhom" runat="server" Text='<%# Eval("ten_nhom_sp") %>'></asp:Label>
                        </ItemTemplate>
                        <HeaderStyle HorizontalAlign="Left" VerticalAlign="Middle" Width="200px" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Hiển thị">
                        <EditItemTemplate>
                            <asp:CheckBox ID="chk_hienthi" runat="server" 
                                Checked='<%# Eval("hien_thi") %>' />
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:CheckBox ID="CheckBox1" runat="server" Checked='<%# Bind("hien_thi") %>' 
                                Enabled="false" />
                        </ItemTemplate>
                        <HeaderStyle HorizontalAlign="Left" VerticalAlign="Middle" Width="60px" />
                        <ItemStyle CssClass="pad" HorizontalAlign="Center" VerticalAlign="Middle" />
                    </asp:TemplateField>
                    <asp:TemplateField ShowHeader="False">
                        <EditItemTemplate>
                            <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="True" 
                                CommandName="Update" 
                                onclientclick="return confirm('Bạn có chắc là muốn thay đổi thông tin này ?');" 
                                Text="Lưu"></asp:LinkButton>
                            &nbsp;<asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" 
                                CommandName="Cancel" Text="Không"></asp:LinkButton>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" 
                                CommandName="Edit" Text="Sửa"></asp:LinkButton>
                            &nbsp;<asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" 
                                CommandName="Delete" 
                                onclientclick="return confirm('Bạn có chắc là muốn Xoá thông tin này ?');" 
                                Text="Xoá"></asp:LinkButton>
                        </ItemTemplate>
                        <HeaderStyle Width="80px" />
                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
        </td>
    </tr>
    <tr>
        <td>
            &nbsp;</td>
        <td>
            &nbsp;</td>
    </tr>
    <tr>
        <td>
            &nbsp;</td>
        <td align="right">
            <asp:Label ID="lbl_thongke" runat="server"></asp:Label>
        </td>
    </tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>